home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-ROM Collection
/
Amiga CD-ROM Collection - Auge 4000 and Cactus and Demo Util.iso
/
auge4000
/
46
/
lib
/
string
/
strerror.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-20
|
779b
|
46 lines
/*
* STRERROR.C
*
* (c)Copyright 1990, Matthew Dillon, All Rights Reserved
*/
#include <string.h>
#include <errno.h>
char *
strerror(error)
int error;
{
switch(error) {
case EDOM:
return("domain");
case ERANGE:
return("range");
case EBADF:
return("bad file descriptor");
case ENOPERM:
return("no permission");
case ENOMEM:
return("no memory");
case ENOFILE:
return("unable to open");
case EACCES:
return("no access");
case EINVAL:
return("invalid argument");
case EMFILE:
return("ran out of descriptors");
case EAGAIN:
return("try again");
case EPEER:
return("connection reset by peer");
case EPIPE:
return("broken pipe");
case ENOTFND:
return("file not found");
}
return("unknown error");
}